PATalkClosePrep
PATalkClosePrep Request permission to close The .MPP Driver
#include <AppleTalk.h> AppleTalk Manager
OSErr PATalkClosePrep( thePBptr, async);
MPPPBPtr thePBptr; address of an .MPP parameter block structure
Boolean async; 0=await completion; 1=immediate return
returns Error Code; 0=no error
PATalkClosePrep calls each routine listed in the AppleTalk Transition
Queue to request permission to close The .MPP Driver
thePBptr is a pointer to an .MPP parameter block structure. The relevant
fields are as follows:
Out-In Name Type Size Offset Description
Æ csCode short 2 26 Always PATalkClosePrep
¨ appName Ptr 4 28 Pointer to application that denies request
async is a Boolean value. Use FALSE for normal ( synchronous) operation
or TRUE to enqueue the request and resume control immediately. See
Async I/O.
Returns: an operating system Error Code. It will be one of:
noErr (0) No error
closeErr (-24) Permission to close .MPP was denied

Notes: The PATalkClosePrep function calls each routine listed in the AppleTalk
Transition Queue to request permission to close The .MPP Driver.
If a routine in the AppleTalk Transition Queue denies permission to close
The .MPP Driver, that routine can return a pointer to a high- level
language string. The high-level language string should contain the name of
the application that placed the entry in the AppleTalk Transition Queue. The
PATalkClosePrep function returns that pointer in the appName field.
The function also returns the result code closeErr, indicating that the
calling routine has been denied permission to close The .MPP Driver. The
routine that called PATalkClosePrep can then display a dialog box telling
the user the name of the application that is currently using AppleTalk and
asking whether to close AppleTalk anyway.
The csCode parameter is a routine selector; it is always equal to
PATalkClosePrep for this function.